<template>
	<view class="page-content">
		
		
			
				<view class="bg-white pt20">
					<view>
						<view class="fz14 c3">开户行</view>
						<view class="p12 mt8" style="background: #F8F8F8;">
							<input style="padding: 0;" v-model="post.memberName" type="text" placeholder="请填写您的姓名"/>
						</view>
					</view>
					<view class="mt18">
						<view class="fz14 c3">卡号</view>
						<view class="p12 mt8" style="background: #F8F8F8;">
							<input style="padding: 0;" v-model="post.memberCode" type="text" placeholder="请填写您的卡号"/>
						</view>
					</view>
					<view class="mt18">
						<view class="fz14 c3">银行预留手机号</view>
						<view class="p12 mt8" style="background: #F8F8F8;">
							<input style="padding: 0;" v-model="post.memberPhone" type="text" placeholder="请填写您的手机号码"/>
						</view>
					</view>
					<!-- <view class="mt18">
						<view class="fz14 c3">验证码</view>
						<view class="p12 mt8" style="background: #F8F8F8;">
							<input style="padding: 0;" v-model="post.value" type="text" placeholder="请输入验证码"/>
							<view v-if="showText" class="t-c" @tap="getCode()">获取验证码</view>
							<view v-else class="t-c" style="color: #A7A7A7;">重新发送({{ second }})</view>
						</view>
					</view> -->
					
					<view class="mt40">
						<view class="btn fz14" @click="toAdd">提交</view>
					</view>
				</view>
			
	</view>
</template>

<script>
	export default {
		data() {
			return {
				second: 60, //默认60秒
				showText: true, //判断短信是否发送
				isDisabled:false,
				post:{
					memberName:'',
					memberCode:'',
					cardType:'储蓄卡',
					memberPhone:'',
					memberPrcture:'',
				}
			}
		},
		onLoad() {},
		onShow() {},
		methods: {
			toAdd(){
				console.log(this.isDisabled)
				
					if (this.isDisabled) {
						return
					}
					this.isDisabled = true
					let post = JSON.parse(JSON.stringify(this.post))
					this.$api.bankAdd(post,(res) => {
						if (res.code==200) {
							this.$emit('success')
						} else {
				
							this.$common.errorToShow(res.msg)
							this.isDisabled = false
						}
					})
				
			},
		}
	}
</script>

<style scoped lang="scss">
	
	.btn{
		line-height: 80rpx;
		background: #F24646;
		text-align: center;
		width: 100%;
		color: #fff;
	}
</style>